package com.trust.service.impl;


import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.trust.entity.PurchaseDetail;
import com.trust.mapper.PurchaseDetailMapper;
import com.trust.service.PurchaseDetailService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;

import java.util.List;

@Slf4j
@Service
public class PurchaseDetailServiceImpl extends ServiceImpl<PurchaseDetailMapper, PurchaseDetail> implements PurchaseDetailService {

    @Override
    public List<PurchaseDetail> getByPurchaseId(Integer purchaseId) {
        LambdaQueryWrapper<PurchaseDetail> queryWrapper = new LambdaQueryWrapper<>();
        queryWrapper.eq(PurchaseDetail::getPurchaseId, purchaseId);
        return this.list(queryWrapper);
    }
}
